package com.test.aop;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Role;

@Configuration
public class MyAopConfigration {


    @Role(value = BeanDefinition.ROLE_INFRASTRUCTURE)
    @Bean
    public MyAopAnnotationAdvisor dynamicDatasourceAnnotationAdvisor() {
        MyAopAnnotationInterceptor interceptor = new MyAopAnnotationInterceptor();
        MyAopAnnotationAdvisor advisor = new MyAopAnnotationAdvisor(interceptor);
        return advisor;
    }
}
